package com.zl.mapper;

import com.zl.dto.TsUserDto;
import com.zl.entity.TsUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {

    TsUser findByUsername(String username);

    TsUser findByEmail(String email);

    void save(TsUserDto resources);

    long update(TsUserDto resources);

    long deleteById(Long id);

    long updatePass(@Param("username") String username, @Param("newPaas") String newPaas);

    long updateAvatar(@Param("username")String username, @Param("url") String url);

    TsUser findByName(String username);
}
